package com.opensource.lzx.enums;

/**
 * @Author: 739891618@qq.com
 * @Date: 2022-11-15 23:04:07
 * @ClassName: ValidType
 * @Describe: this is a ...
 */
public enum ValidType {
    EMPTY_VALID(1),
    RANGE_VALID(2);

    private Integer order;

    ValidType(Integer order) {
        this.order = order;
    }

    public Integer getOrder() {
        return order;
    }

    public static ValidType getTypeByOrder(int order) {
        for (ValidType value : ValidType.values()) {
            if (value.getOrder() == order) {
                return value;
            }
        }
        return ValidType.EMPTY_VALID;
    }
}
